<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            margin: 0 auto;
            border: 2px solid red;
            height: 400px;
            width: 1000px;
            display: flex;
            justify-content: space-evenly;
            align-items: end;
        }

        .box div {
            width: 100px;
            background-color: aqua;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            text-align: center;
        }

        .box div span {
            margin-top: -20px;
        }

        .box div h4 {
            margin-bottom: -40px;
        }
    </style>
</head>

<body>
    <script>
        arr1 = []
        for (let i = 1; i <= 4; i++) {
            p = +prompt(`请输入第${i}季度的数据`)
            arr1.push(p)
        } alert(arr1)
        document.write(`<div class="box">`)
        for (let a = 0; a < arr1.length; a++) {
            document.write(`
                <div style = "height : ${arr1[a]}px;">
                    <span>${arr1[a]}</span>
                    <h4>第${a + 1}季度</h4>
                 </div>
                `)
        }
        document.write(`</div>`)

    </script>
</body>

</html>